import { Component } from 'react';
import ReactDOM from 'react-dom';

import { Toast, Button } from 'saltui';

import './PageHome.less';

export default class PageHome extends Component {

  constructor() {
    super();
    this.state = {
      iFrameHeight: '0px'
    }
  }


  render() {
    const t = this;
    return (
      <div className="page-home">
      <iframe className="index-left"
              style={{height:this.state.iFrameHeight, overflow:'visible'}}
              onLoad={() => {

                    this.setState({
                        "iFrameHeight": window.innerHeight + 'px'
                    });
                }}

              src="/#/console"></iframe>
        <iframe className="index-right"
                style={{height:this.state.iFrameHeight, overflow:'visible'}}
                onLoad={() => {
                    const obj = ReactDOM.findDOMNode(this);
                    this.setState({
                       "iFrameHeight": window.innerHeight + 'px'
                    });
                }}

                src="/#/roomhandle"></iframe>
      </div>
    );
  }
}

